package com.cskaoyan.mapper;

import com.cskaoyan.vo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author stone
 * @date 2022/03/29 11:47
 */
public interface UserMapper {

    int selectCountByAge(@Param("age") Integer age);

    String[] selectUsernameArrayByAge(@Param("age") Integer age);
    //List<String> selectUsernameArrayByAge(@Param("age") Integer age);

    List<String> selectUsernameListByAge(@Param("age") Integer age);

    User selectByPrimaryKey(@Param("id") Integer id);

    User[] selectUsersByAge(@Param("age") Integer age);
    //List<User> selectUsersByAge(@Param("age") Integer age);

    //将第21行和第23行的方法使用resultMap来改造
    User selectByPrimaryKeyResultMap(@Param("id") Integer id);

    User[] selectUsersByAgeResultMap(@Param("age") Integer age);
}
